﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PwdMgrUI.Objects
{
    public class CommandNotificationEventArgs : EventArgs
    {
        public CommandNotificationEventArgs(
            string identifier,
            CommandResult result,
            IDictionary<CommandError, string> errors)
        {
            Identifier = identifier;
            Result = result;
            Errors = errors;
        }

        public string Identifier { get; private set; }
        public CommandResult Result { get; private set; }
        public IDictionary<CommandError, string> Errors { get; private set; }
    }

    public enum CommandResult
    {
        Failed = -1,
        None = 0,
        Success = 1,
    }

    public enum CommandError
    {
        Unknown = 0,
        InvalidateUsername,
        InvalidatePassword,
        PasswordAndConfirmPasswordNotEquals,
        UserAlreadyExist,
    }
}
